<?php

namespace app\controller\v1\api;

use app\BaseController;
use app\common\Send;
use app\service\CashMoneyService;
use think\App;
use think\Request;
class CashMoney  extends BaseController
{
    use Send;

    protected $cashMoneyService;

    public function __construct(App $app, CashMoneyService $cashMoneyService)
        {
        parent::__construct($app);
        $this->cashMoneyService = $cashMoneyService;
    }

    public function index(Request $request)
    {
        $params = $request->param();
        $result = $this->cashMoneyService->apiList($params);
        return self::success($result);
    }

    public function save(Request $request)
    {
        $params = $request->param();
        $result = $this->cashMoneyService->save($params);
        return self::success($result);
    }

}
